package problem0063

func climbStairs(n int) (res int) {

	if n <= 2 {
		return n
	}
	dp := make([]int, n+1)
	dp[1] = 1
	dp[2] = 2
	for i := 3; i < n+1; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}
	// fmt.Println("dp", gconv.Export(dp))
	return dp[n]
}
